package com.example.shaomengjie.smvp.view;

import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.example.shaomengjie.smvp.R;
import com.example.shaomengjie.smvp.framework.view.AppDelegate;

/**
 * Created by shaomengjie on 2017/6/20.
 */

public class SimpleDelegate extends AppDelegate {

    private Button button;
    private TextView textView;

    @Override
    public int getRootLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    public void initWidget() {
        super.initWidget();
        button = get(R.id.button);
        textView = get(R.id.mTextView);
    }
    public void setTextView(String data){
        textView.setText(data);
    }
    public void showToast(String s){
        toast(s);
    }
}
